/* 
api管理
*/
import request from './../utils/request'

export default {
  login(data) {
    return request({
      url: '/users/login',
      method: 'post',
      data,
    })
  },
  noticeCount(data = {}) {
    return request({
      url: '/leave/count',
      method: 'get',
      data,
      mock: false,
    })
  },
  getMenuList(data = {}) {
    return request({
      url: '/menu/list',
      method: 'get',
      data,
      mock: false
    })
  },
  getUserList(data = {}) {
    return request({
      url: '/users/list',
      method: 'get',
      data,
      mock: false
    })
  },
  getUserAllList() {
    return request({
      url: '/users/allList',
      method: 'get',
      data: {},
      mock: false
    })
  },
  getPermissionList() {
    return request({
      url: '/users/getPermissionList',
      method: 'get',
      data: {},
      mock: false
    })
  },
  getRoleList1(data = {}) {
    return request({
      url: '/roles/allList',
      method: 'get',
      data,
      mock: false
    })
  },
  getRoleList(data = {}) {
    return request({
      url: '/roles/list',
      method: 'get',
      data,
      mock: false
    })
  },
  userDel(params) {
    return request({
      url: '/users/delete',
      method: 'post',
      data: params
    })
  },
  userSubmit(data = {}) {
    return request({
      url: '/users/operate',
      method: 'post',
      data,
      mock: false
    })
  },
  menuSubmit(data = {}) {
    return request({
      url: '/menu/operate',
      method: 'post',
      data,
      mock: false
    })
  },
  roleSubmit(data = {}) {
    return request({
      url: '/roles/operate',
      method: 'post',
      data,
      mock: false
    })
  },
  updatePermission(data = {}) {
    return request({
      url: '/roles/permission',
      method: 'post',
      data,
      mock: false
    })
  },
  getDeptList(data = {}) {
    return request({
      url: '/dept/list',
      method: 'get',
      data,
      mock: false
    })
  },
  deptSubmit(data = {}) {
    return request({
      url: '/dept/operate',
      method: 'post',
      data,
      mock: false
    })
  },
  getLeaveList(data = {}) {
    return request({
      url: '/leave/list',
      method: 'get',
      data,
      mock: false
    })
  },
  leaveSubmit(data = {}) {
    return request({
      url: '/leave/operate',
      method: 'post',
      data,
      mock: false
    })
  },
}